CFLAGS=-DDEBUG

all: factorial_fibonacci multiple_stacks pthread_contention pthread_contention_resolved pthread_creation pthread_join_detach threadparameter


factorial_fibonacci: factorial_fibonacci.c
	gcc -o factorial_fibonacci $(CFLAGS) factorial_fibonacci.c -lpthread

multiple_stacks: multiple_stacks.c
	gcc -o multiple_stacks $(CFLAGS) multiple_stacks.c -lpthread

pthread_contention: pthread_contention.c
	gcc -o pthread_contention $(CFLAGS) pthread_contention.c -lpthread

pthread_contention_resolved: pthread_contention_resolved.c
	gcc -o pthread_contention_resolved $(CFLAGS) pthread_contention_resolved.c -lpthread

pthread_creation: pthread_creation.c
	gcc -o pthread_creation $(CFLAGS) pthread_creation.c -lpthread

pthread_join_detach: pthread_join_detach.c
	gcc -o pthread_join_detach $(CFLAGS) pthread_join_detach.c -lpthread

threadparameter: threadparameter.c
	gcc -o threadparameter $(CFLAGS) threadparameter.c -lpthread

clean:
	rm factorial_fibonacci
	rm multiple_stacks
	rm pthread_contention
	rm pthread_contention_resolved
	rm pthread_creation
	rm pthread_join_detach
	rm threadparameter
